home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tspa2540.zip / TSUNTF.INT < prev    next >
Text File  |  1991-10-27  |  3KB  |  76 lines

  1. {$B-,F-,I+,N-,V+}
  2. {$S+}
  3. {$R-}
  4. {$D-}
  5.  
  6. (*
  7. Timo Salmi UNiT F
  8. A Turbo Pascal unit for readln with string editing
  9. All rights reserved 19-Aug-89
  10. Updated 4-Sep-89, 24-Sep-89, 21-Mar-90, 14-Jun-90
  11.  
  12. TSUNTF first appeared in release TSPAS13 of my Turbo Pascal units package.
  13.  
  14. This unit may be used and distributed freely for PRIVATE, NON-COMMERCIAL,
  15. NON-INSTITUTIONAL purposes, provided it is not changed in any way. For
  16. ANY other usage, such as use in a business enterprise or a university,
  17. contact the author for the terms of registration.
  18.  
  19. The units are under development. Comments and contacts are solicited. If
  20. you have any questions, please do not hesitate to use electronic mail for
  21. communication.
  22. InterNet address: ts@chyde.uwasa.fi         (preferred)
  23. Funet address:    GADO::SALMI
  24. Bitnet address:   SALMI@FINFUN
  25.  
  26. The author shall not be liable to the user for any direct, indirect or
  27. consequential loss arising from the use of, or inability to use, any unit,
  28. program or file howsoever caused. No warranty is given that the units and
  29. programs will work under all circumstances.
  30.  
  31. Timo Salmi
  32. Professor of Accounting and Business Finance
  33. School of Business Studies, University of Vaasa
  34. P.O. BOX 297, SF-65101 Vaasa, Finland
  35. *)
  36.  
  37. unit TSUNTF;
  38.  
  39. (* ======================================================================= *)
  40.                           interface
  41. (* ======================================================================= *)
  42.  
  43. uses Dos,
  44.      Crt;
  45.  
  46. (* An enhanced readln with the possibility of editing input strings
  47.    using insert mode
  48.      The functional edit keys are
  49.        BackSpace
  50.        Del
  51.        CursorLeft
  52.        CursorRight
  53.        Home
  54.        End
  55.        Esc *)
  56. procedure EDRDLN (prompt : string; var InputString : string);
  57.  
  58. (* This version gives the possibility of recalling a string by pressing
  59.    the CursorUp key. Insert key is also functional *)
  60. procedure EDREADLN (prompt          : string;
  61.                     RecallString    : string;
  62.                     var InputString : string);
  63.  
  64. (* This is the most versatile of the enhanced readln. It has the same
  65.    characteristics as EDRDLN and EDREADLN, plus it detects whether the
  66.    break has been pressed. Furthermore, the maximum witdth of the screen
  67.    is given as a parameter (MaxLength) which is very useful if you
  68.    application makes windows.
  69. *)
  70. procedure EDREABLN (Prompt           : string;
  71.                     RecallString     : string;
  72.                     MaxLength        : integer;
  73.                     var InputString  : string;
  74.                     var BreakPressed : boolean);
  75.  
  76.